package com.itheima.day07;

public class Demo09 {

    public static void main(String[] args) {
        new Thread() {
            int sum = 0;
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    sum += i;

                }
                System.out.println(sum);
            }
        }.start();


        new Thread(new Runnable() {
            int sum = 0;
            @Override
            public void run() {
                for (int i = 0; i < 500; i++) {
                    sum += i;
                }
                System.out.println(sum);
            }
        }) .start();





    }
    
}
